/*    */ package com.qmsk.business.manage.userOperLog.dao;
/*    */ 
/*    */ import com.qmsk.business.sys.basic.SupportDAO;
/*    */ import com.utils.basic.ObjectComm;
/*    */ import com.utils.gson.out.GsonEbRst;
/*    */ import java.sql.SQLException;
/*    */ 
/*    */ public class UserOperLogDao extends SupportDAO
/*    */ {
/*    */   public GsonEbRst getGsonOfAll(Integer nPageIdx, Short nPageSize)
/*    */     throws SQLException
/*    */   {
/* 21 */     return getGsonOfParams("selectSqlOfAll", "selectCountSqlOfAll", 
/* 22 */       "selectJsonOfAll", nPageIdx, nPageSize);
/*    */   }
/*    */ 
/*    */   public Integer insertUserLog(Long userId, String userName, String funCode, String funOperCode, Boolean nPower, String sIP, String shopId)
/*    */     throws SQLException
/*    */   {
/* 28 */     Long shopIdL = ObjectComm.stringToLong(shopId, Long.valueOf(0L));
/* 29 */     if ((funCode != null) && 
/* 30 */       (funCode.length() >= 30)) {
/* 31 */       funCode = funCode.substring(0, 30);
/*    */     }
/*    */ 
/* 34 */     if ((funOperCode != null) && 
/* 35 */       (funOperCode.length() >= 20)) {
/* 36 */       funOperCode = funOperCode.substring(0, 20);
/*    */     }
/*    */ 
/* 39 */     Object[] params = { userId, userName, funCode, 
/* 40 */       funOperCode, nPower, sIP, shopIdL };
/* 41 */     return Integer.valueOf(update("insertUserLog", params));
/*    */   }
/*    */ 
/*    */   private Boolean isExistsUserFunCode(Object userId, Object funCode) throws SQLException
/*    */   {
/* 46 */     Object[] params = { userId, funCode };
/* 47 */     return queryForBoolean("isExistsUserFunction", params, Boolean.valueOf(false));
/*    */   }
/*    */ 
/*    */   private Boolean isExistsUserFunCodeOper(Object userId, Object funCode, Object funOperId) throws SQLException
/*    */   {
/* 52 */     Object[] params = { userId, funCode, funOperId };
/* 53 */     return queryForBoolean("isExistsUserFunOper", params, Boolean.valueOf(false));
/*    */   }
/*    */ 
/*    */   public Boolean isExistsUserFunCode(Object userId, Object funCode, Object funOperId) throws SQLException
/*    */   {
/* 58 */     boolean bReturn = false;
/* 59 */     bReturn = isExistsUserFunCodeOper(userId, funCode, funOperId).booleanValue();
/* 60 */     if (!(bReturn)) {
/* 61 */       bReturn = isExistsUserFunCode(userId, funCode).booleanValue();
/*    */     }
/* 63 */     return Boolean.valueOf(bReturn);
/*    */   }
/*    */ }

/* Location:           C:\Users\Administrator\Desktop\新建文件夹\WEB-INF\classes\
 * Qualified Name:     com.qmsk.business.manage.userOperLog.dao.UserOperLogDao
 * JD-Core Version:    0.5.3
 */